package de.tabuma.soap.entity;

import de.tabuma.soap.entity.bpel.*;
import de.tabuma.soap.entity.soap.*;
import de.tabuma.soap.entity.wsdl.*;
import de.tabuma.soap.entity.xsd.*;
import de.tabuma.soap.logik.*;
import javax.jdo.annotations.*;
import java.io.*;
import java.util.*;
import java.util.logging.*;
import java.lang.reflect.*;
import org.xml.sax.SAXException;

/**
 * This a proxy class for any entity of de.tabuma.soap.entity.*.
 * @author $Author: alefen $
 * @version $Revision: 1.1 $
 * @since $Date: 2009/12/30 02:53:55 $
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class AnyElement implements Serializable {

    private static Logger log = Logger.getLogger(AnyElement.class.getName());

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;
    public Long getId() {
        return id;
    }

    public AnyElement() {}
    
    @Persistent
    private Long bPartnerLinkTypeId = new Long(0);
    public Long getBPartnerLinkTypeId() {
        return bPartnerLinkTypeId;
    }

    @Persistent
    private Long bRoleId = new Long(0);
    public Long getBRoleId() {
        return bRoleId;
    }

    @Persistent
    private Long sAddressId = new Long(0);
    public Long getSAddressId() {
        return sAddressId;
    }

    @Persistent
    private Long sBindingId = new Long(0);
    public Long getSBindingId() {
        return sBindingId;
    }

    @Persistent
    private Long sBodyId = new Long(0);
    public Long getSBodyId() {
        return sBodyId;
    }

    @Persistent
    private Long sFaultId = new Long(0);
    public Long getSFaultId() {
        return sFaultId;
    }

    @Persistent
    private Long sHeaderId = new Long(0);
    public Long getSHeaderId() {
        return sHeaderId;
    }

    @Persistent
    private Long sHeaderFaultId = new Long(0);
    public Long getSHeaderFaultId() {
        return sHeaderFaultId;
    }

    @Persistent
    private Long sOperationId = new Long(0);
    public Long getSOperationId() {
        return sOperationId;
    }

    @Persistent
    private Long tBindingId = new Long(0);
    public Long getTBindingId() {
        return tBindingId;
    }

    @Persistent
    private Long bindingOperationId = new Long(0);
    public Long getBindingOperationId() {
        return bindingOperationId;
    }

    @Persistent
    private Long bindingOperationFaultId = new Long(0);
    public Long getBindingOperationFaultId() {
        return bindingOperationFaultId;
    }

    @Persistent
    private Long bindingOperationMessageOutputId = new Long(0);
    public Long getBindingOperationMessageOutputId() {
        return bindingOperationMessageOutputId;
    }

    @Persistent
    private Long bindingOperationMessageInputId = new Long(0);
    public Long getBindingOperationMessageInputId() {
        return bindingOperationMessageInputId;
    }

    @Persistent
    private Long tDefinitionsId = new Long(0);
    public Long getDefinitionsId() {
        return tDefinitionsId;
    }

    @Persistent
    private Long documentId = new Long(0);
    public Long getDocumentId() {
        return documentId;
    }

    @Persistent
    private Long documentationId = new Long(0);
    public Long getDocumentationId() {
        return documentationId;
    }

    @Persistent
    private Long faultId = new Long(0);
    public Long getFaultId() {
        return faultId;
    }

    @Persistent
    private Long importId = new Long(0);
    public Long getImportId() {
        return importId;
    }

    @Persistent
    private Long messageId = new Long(0);
    public Long getMessageId() {
        return messageId;
    }

    @Persistent
    private Long operationId = new Long(0);
    public Long getOperationId() {
        return operationId;
    }

    @Persistent
    private Long paramInputId = new Long(0);
    public Long getInputParamId() {
        return paramInputId;
    }

    @Persistent
    private Long paramOutputId = new Long(0);
    public Long getParamOutputId() {
        return paramOutputId;
    }

    @Persistent
    private Long partId = new Long(0);
    public Long getPartId() {
        return partId;
    }

    @Persistent
    private Long portId = new Long(0);
    public Long getPortId() {
        return portId;
    }

    @Persistent
    private Long portTypeId = new Long(0);
    public Long getPortTypeId() {
        return portTypeId;
    }

    @Persistent
    private Long serviceId = new Long(0);
    public Long getServiceId() {
        return serviceId;
    }

    @Persistent
    private Long typesId = new Long(0);
    public Long getTypesId() {
        return typesId;
    }

    @Persistent
    private Long xsAllId = new Long(0);
    public Long getXsAllId() {
        return xsAllId;
    }

    @Persistent
    private Long xsAnnotationId = new Long(0);
    public Long getXsAnnotationId() {
        return xsAnnotationId;
    }

    @Persistent
    private Long xsAnyId = new Long(0);
    public Long getXsAnyId() {
        return xsAnyId;
    }

    @Persistent
    private Long xsAnyAttributeId = new Long(0);
    public Long getXsAnyAttributeId() {
        return xsAnyAttributeId;
    }

    @Persistent
    private Long xsAppInfoId = new Long(0);
    public Long getXsAppInfoId() {
        return xsAppInfoId;
    }

    @Persistent
    private Long xsAttributeId = new Long(0);
    public Long getXsAttributeId() {
        return xsAttributeId;
    }

    @Persistent
    private Long xsAttributeGroupId = new Long(0);
    public Long getXsAttributeGroupId() {
        return xsAttributeGroupId;
    }

    @Persistent
    private Long xsChoiceId = new Long(0);
    public Long getXsChoiceId() {
        return xsChoiceId;
    }

    @Persistent
    private Long xsComplexContentId = new Long(0);
    public Long getXsComplexContentId() {
        return xsComplexContentId;
    }

    @Persistent
    private Long xsComplexTypeId = new Long(0);
    public Long getXsComplexTypeId() {
        return xsComplexTypeId;
    }

    @Persistent
    private Long xsDocumentationId = new Long(0);
    public Long getXsDocumentationId() {
        return xsDocumentationId;
    }

    @Persistent
    private Long xsElementId = new Long(0);
    public Long getXsElementId() {
        return xsElementId;
    }

    @Persistent
    private Long xsEnumerationId = new Long(0);
    public Long getXsEnumerationId() {
        return xsEnumerationId;
    }

    @Persistent
    private Long xsExtensionId = new Long(0);
    public Long getXsExtensionId() {
        return xsExtensionId;
    }

    private Long xsFieldId = new Long(0);
    public Long getXsFieldId() {
        return xsFieldId;
    }

    @Persistent
    private Long xsFractionDigitsId = new Long(0);
    public Long getXsFractionDigitsId() {
        return xsFractionDigitsId;
    }

    @Persistent
    private Long xsGroupId = new Long(0);
    public Long getXsGroupId() {
        return xsGroupId;
    }

    @Persistent
    private Long xsImportId = new Long(0);
    public Long getXsImportId() {
        return xsImportId;
    }

    @Persistent
    private Long xsIncludeId = new Long(0);
    public Long getXsIncludeId() {
        return xsIncludeId;
    }

    @Persistent
    private Long xsKeyId = new Long(0);
    public Long getXsKeyId() {
        return xsKeyId;
    }

    @Persistent
    private Long xsKeyRefId = new Long(0);
    public Long getXsKeyRefId() {
        return xsKeyRefId;
    }

    @Persistent
    private Long xsLengthId = new Long(0);
    public Long getXsLengthId() {
        return xsLengthId;
    }

    @Persistent
    private Long xsListId = new Long(0);
    public Long getXsListId() {
        return xsListId;
    }

    @Persistent
    private Long xsMaxExclusiveId = new Long(0);
    public Long getXsMaxExclusiveId() {
        return xsMaxExclusiveId;
    }

    @Persistent
    private Long xsMaxInclusiveId = new Long(0);
    public Long getXsMaxInclusiveId() {
        return xsMaxInclusiveId;
    }

    @Persistent
    private Long xsMaxLengthId = new Long(0);
    public Long getXsMaxLengthId() {
        return xsMaxLengthId;
    }

    @Persistent
    private Long xsMinExclusiveId = new Long(0);
    public Long getXsMinExclusiveId() {
        return xsMinExclusiveId;
    }

    @Persistent
    private Long xsMinInclusiveId = new Long(0);
    public Long getXsMinInclusiveId() {
        return xsMinInclusiveId;
    }

    @Persistent
    private Long xsMinLengthId = new Long(0);
    public Long getXsMinLengthId() {
        return xsMinLengthId;
    }

    @Persistent
    private Long xsNotationId = new Long(0);
    public Long getXsNotationId() {
        return xsNotationId;
    }

    @Persistent
    private Long xsPatternId = new Long(0);
    public Long getXsPatternId() {
        return xsPatternId;
    }

    @Persistent
    private Long xsRedefineId = new Long(0);
    public Long getXsRedefineId() {
        return xsRedefineId;
    }

    @Persistent
    private Long xsRestrictionId = new Long(0);
    public Long getXsRestrictionId() {
        return xsRestrictionId;
    }
    
    @Persistent
    private Long xsSchemaId = new Long(0);
    public Long getXsSchemaId() {
        return xsSchemaId;
    }
    
    @Persistent
    private Long xsSelectorId = new Long(0);
    public Long getXsSelectorId() {
        return xsSelectorId;
    }
    
    @Persistent
    private Long xsSequenceId = new Long(0);
    public Long getXsSequenceId() {
        return xsSequenceId;
    }

    @Persistent
    private Long xsSimpleContentId = new Long(0);
    public Long getXsSimpleContentId() {
        return xsSimpleContentId;
    }
    
    @Persistent
    private Long xsSimpleTypeId = new Long(0);
    public Long getXsSimpleTypeId() {
        return xsSimpleTypeId;
    }
    
    @Persistent
    private Long xsTotalDigitsId = new Long(0);
    public Long getXsTotalDigitsId() {
        return xsTotalDigitsId;
    }
    
    @Persistent
    private Long xsUnionId = new Long(0);
    public Long getXsUnionId() {
        return xsUnionId;
    }

    @Persistent
    private Long xsUniqueId = new Long(0);
    public Long getXsUniqueId() {
        return xsUniqueId;
    }

    @Persistent
    private Long xsWhitespaceId = new Long(0);
    public Long getXsWhitespaceId() {
        return xsWhitespaceId;
    }

    public AnyElement(Object ps) throws SAXException {
        try {
            if(ps instanceof BPartnerLinkType) {
                BPartnerLinkType element = ((BPartnerLinkType)ps);
                if(element.getId()!=null) {
                    this.bPartnerLinkTypeId = ((BPartnerLinkType)ps).getId();
                }
                else {
                    this.bPartnerLinkTypeId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof BRole) {
                BRole element = ((BRole)ps);
                if(element.getId()!=null) {
                    this.bRoleId = ((BRole)ps).getId();
                }
                else {
                    this.bRoleId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof SAddress) {
                SAddress element = ((SAddress)ps);
                if(element.getId()!=null) {
                    this.sAddressId = ((SAddress)ps).getId();
                }
                else {
                    this.sAddressId = PMF.doCreate(element);
                }
                return;

            }
            if(ps instanceof SBinding) {
                SBinding element = (SBinding) ps;
                if(element.getId()!=null) {
                    this.sBindingId = ((SBinding)ps).getId();
                }
                else {
                    this.sBindingId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof SBody) {
                SBody element = (SBody) ps;
                if(element.getId()!=null) {
                    this.sBodyId = ((SBody)ps).getId();
                }
                else {
                    this.sBodyId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof SFault) {
                SFault element = (SFault) ps;
                if(element.getId()!=null) {
                    this.sFaultId = element.getId();
                }
                else {
                    this.sFaultId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof SHeader) {
                SHeader element = (SHeader) ps;
                if(element.getId()!=null) {
                    this.sHeaderId = ((SHeader)ps).getId();
                }
                else {
                    this.sHeaderId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof SHeaderFault) {
                SHeaderFault element = (SHeaderFault) ps;
                if(element.getId()!=null) {
                    this.sHeaderFaultId = ((SHeaderFault)ps).getId();
                }
                else {
                    this.sHeaderFaultId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof SOperation) {
                SOperation element = (SOperation) ps;
                if(element.getId()!=null) {
                    this.sOperationId = ((SOperation)ps).getId();
                }
                else {
                    this.sOperationId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TBinding) {
                TBinding element = (TBinding) ps;
                if(element.getId()!=null) {
                    this.tBindingId = ((TBinding)ps).getId();
                }
                else {
                    this.tBindingId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TBindingOperation) {
                TBindingOperation element = (TBindingOperation) ps;
                if(element.getId()!=null) {
                    this.bindingOperationId = element.getId();
                }
                else {
                    this.bindingOperationId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TBindingOperationFault) {
                TBindingOperationFault element = (TBindingOperationFault) ps;
                if(element.getId()!=null) {
                    this.bindingOperationFaultId = ((TBindingOperationFault)ps).getId();
                }
                else {
                    this.bindingOperationFaultId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TBindingOperationMessageOutput) {
                TBindingOperationMessageOutput element = (TBindingOperationMessageOutput) ps;
                if(element.getId()!=null) {
                    this.bindingOperationMessageOutputId = ((TBindingOperationMessageOutput)ps).getId();
                }
                else {
                    this.bindingOperationMessageOutputId = element.getId();
                }
                return;
            }
            if(ps instanceof TBindingOperationMessageInput) {
                TBindingOperationMessageInput element = (TBindingOperationMessageInput) ps;
                if(element.getId()!=null) {
                    this.bindingOperationMessageInputId = ((TBindingOperationMessageInput)ps).getId();
                }
                else {
                    this.bindingOperationMessageInputId = element.getId();
                }
                return;
            }
            if(ps instanceof TDefinitions) {
                TDefinitions element = (TDefinitions) ps;
                if(element.getId()!=null) {
                    this.tDefinitionsId = ((TDefinitions)ps).getId();
                }
                else {
                    this.tDefinitionsId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TDocument) {
                TDocument element = (TDocument) ps;
                if(element.getId()!=null) {
                    this.documentId = ((TDocument)ps).getId();
                }
                else {
                    this.documentId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TDocumentation) {
                TDocumentation element = (TDocumentation) ps;
                if(element.getId()!=null) {
                    this.documentationId = ((TDocumentation)ps).getId();
                }
                else {
                    this.documentationId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TFault) {
                TFault element = (TFault) ps;
                if(element.getId()!=null) {
                    this.faultId = ((TFault)ps).getId();
                }
                else {
                    this.faultId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TImport) {
                TImport element = (TImport) ps;
                if(element.getId()!=null) {
                    this.importId = ((TImport)ps).getId();
                }
                else {
                    this.importId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TMessage) {
                TMessage element = (TMessage) ps;
                if(element.getId()!=null) {
                    this.messageId = ((TMessage)ps).getId();
                }
                else {
                    this.messageId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TOperation) {
                TOperation element = (TOperation) ps;
                if(element.getId()!=null) {
                    this.operationId = ((TOperation)ps).getId();
                }
                else {
                    this.operationId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TParamInput) {
                TParamInput element = (TParamInput) ps;
                if(element.getId()!=null) {
                    this.paramInputId = ((TParamInput)ps).getId();
                }
                else {
                    this.paramInputId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TParamOutput) {
                TParamOutput element = (TParamOutput) ps;
                if(element.getId()!=null) {
                    this.paramOutputId = ((TParamOutput)ps).getId();
                }
                else {
                    this.paramOutputId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TPart) {
                TPart element = (TPart) ps;
                if(element.getId()!=null) {
                    this.partId = ((TPart)ps).getId();
                }
                else {
                    this.partId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TPort) {
                TPort element = (TPort) ps;
                if(element.getId()!=null) {
                    this.portId = ((TPort)ps).getId();
                }
                else {
                    this.portId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TPortType) {
                TPortType element = (TPortType) ps;
                if(element.getId()!=null) {
                    this.portTypeId = ((TPortType)ps).getId();
                }
                else {
                    this.portTypeId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof TService) {
                TService element = (TService) ps;
                if(element.getId()!=null) {
                    this.serviceId = ((TService)ps).getId();
                }
                else {
                    this.serviceId = PMF.doCreate(element);
                }
                return;
            }
            log.fine(ps.toString());
            if(ps instanceof TTypes) {
                log.fine(ps.toString());
                TTypes element = (TTypes) ps;
                log.fine("elementId:"+element.getId());
                if(element.getId()!=null) {
                    this.typesId = element.getId();
                }
                else {
                    this.typesId = PMF.doCreate(element);
                }
                log.fine("typesId:"+this.typesId);
                return;
            }
            if(ps instanceof XsAll) {
                XsAll element = (XsAll) ps;
                if(element.getId1()!=null) {
                    this.xsAllId = ((XsAll)ps).getId1();
                }
                else {
                    this.xsAllId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsAnnotation) {
                XsAnnotation element = (XsAnnotation) ps;
                if(element.getId()!=null) {
                    this.xsAnnotationId = ((XsAnnotation)ps).getId();
                }
                else {
                    this.xsAnnotationId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsAny) {
                XsAny element = (XsAny) ps;
                if(element.getId1()!=null) {
                    this.xsAnyId = ((XsAny)ps).getId1();
                }
                else {
                    this.xsAnyId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsAnyAttribute) {
                XsAnyAttribute element = (XsAnyAttribute) ps;
                if(element.getId1()!=null) {
                    this.xsAnyAttributeId = ((XsAnyAttribute)ps).getId1();
                }
                else {
                    this.xsAnyAttributeId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsAppInfo) {
                XsAppInfo element = (XsAppInfo) ps;
                if(element.getId1()!=null) {
                    this.xsAppInfoId = ((XsAppInfo)ps).getId1();
                }
                else {
                    this.xsAppInfoId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsAttribute) {
                XsAttribute element = (XsAttribute) ps;
                if(element.getId1()!=null) {
                    this.xsAttributeId = ((XsAttribute)ps).getId1();
                }
                else {
                    this.xsAttributeId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsAttributeGroup) {
                XsAttributeGroup element = (XsAttributeGroup) ps;
                if(element.getId1()!=null) {
                    this.xsAttributeGroupId = ((XsAttributeGroup)ps).getId1();
                }
                else {
                    this.xsAttributeGroupId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsChoice) {
                XsChoice element = (XsChoice) ps;
                if(element.getId1()!=null) {
                    this.xsChoiceId = ((XsChoice)ps).getId1();
                }
                else {
                    this.xsChoiceId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsComplexContent) {
                XsComplexContent element = (XsComplexContent) ps;
                if(element.getId1()!=null) {
                    this.xsComplexContentId = ((XsComplexContent)ps).getId1();
                }
                else {
                    this.xsComplexContentId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsComplexType) {
                XsComplexType element = (XsComplexType) ps;
                if(element.getId1()!=null) {
                    this.xsComplexTypeId = ((XsComplexType)ps).getId1();
                }
                else {
                    this.xsComplexTypeId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsDocumentation) {
                XsDocumentation element = (XsDocumentation) ps;
                if(element.getId1()!=null) {
                    this.xsDocumentationId = ((XsDocumentation)ps).getId1();
                }
                else {
                    this.xsDocumentationId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsElement) {
                XsElement element = (XsElement) ps;
                if(element.getId1()!=null) {
                    this.xsElementId = ((XsElement)ps).getId1();
                }
                else {
                    this.xsElementId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsEnumeration) {
                XsEnumeration element = (XsEnumeration) ps;
                if(element.getId1()!=null) {
                    this.xsEnumerationId = ((XsEnumeration)ps).getId1();
                }
                else {
                    this.xsEnumerationId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsExtension) {
                XsExtension element = (XsExtension) ps;
                if(element.getId1()!=null) {
                    this.xsExtensionId = ((XsExtension)ps).getId1();
                }
                else {
                    this.xsExtensionId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsField) {
                XsField element = (XsField) ps;
                if(element.getId1()!=null) {
                    this.xsFieldId = ((XsField)ps).getId1();
                }
                else {
                    this.xsFieldId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsFractionDigits) { 
                XsFractionDigits element = (XsFractionDigits) ps;
                if(element.getId1()!=null) {
                    this.xsFractionDigitsId = ((XsFractionDigits)ps).getId1();
                }
                else {
                    this.xsFractionDigitsId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsGroup) {
                XsGroup element = (XsGroup) ps;
                if(element.getId1()!=null) {
                    this.xsGroupId = ((XsGroup)ps).getId1();
                }
                else {
                    this.xsGroupId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsImport) {
                XsImport element = (XsImport) ps;
                if(element.getId1()!=null) {
                    this.xsImportId = ((XsImport)ps).getId1();
                }
                else {
                    this.xsImportId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsInclude) {
                XsInclude element = (XsInclude) ps;
                if(element.getId1()!=null) {
                    this.xsIncludeId = ((XsInclude)ps).getId1();
                }
                else {
                    this.xsIncludeId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsKey) {
                XsKey element = (XsKey) ps;
                if(element.getId1()!=null) {
                    this.xsKeyId = ((XsKey)ps).getId1();
                }
                else {
                    this.xsKeyId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsKeyRef) {
                XsKeyRef element = (XsKeyRef) ps;
                if(element.getId1()!=null) {
                    this.xsKeyRefId = ((XsKeyRef)ps).getId1();
                }
                else {
                    this.xsKeyRefId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsLength) {
                XsLength element = (XsLength) ps;
                if(element.getId1()!=null) {
                    this.xsLengthId = ((XsLength)ps).getId1();
                }
                else {
                    this.xsLengthId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsList) {
                XsList element = (XsList) ps;
                if(element.getId1()!=null) {
                    this.xsListId = ((XsList)ps).getId1();
                }
                else {
                    this.xsListId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsMaxExclusive) {
                XsMaxExclusive element = (XsMaxExclusive) ps;
                if(element.getId1()!=null) {
                    this.xsMaxExclusiveId = ((XsMaxExclusive)ps).getId1();
                }
                else {
                    this.xsMaxExclusiveId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsMaxInclusive) {
                XsMaxInclusive element = (XsMaxInclusive) ps;
                if(element.getId1()!=null) {
                    this.xsMaxInclusiveId = ((XsMaxInclusive)ps).getId1();
                }
                else {
                    this.xsMaxInclusiveId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsMaxLength) {
                XsMaxLength element = (XsMaxLength) ps;
                if(element.getId1()!=null) {
                    this.xsMaxLengthId = ((XsMaxLength)ps).getId1();
                }
                else {
                    this.xsMaxLengthId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsMinExclusive) {
                XsMinExclusive element = (XsMinExclusive)ps;
                if(element.getId1()!=null) {
                    this.xsMinExclusiveId = ((XsMinExclusive)ps).getId1();
                }
                else {
                    this.xsMinExclusiveId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsMinInclusive) {
                XsMinInclusive element = (XsMinInclusive) ps;
                if(element.getId1()!=null) {
                    this.xsMinInclusiveId = ((XsMinInclusive)ps).getId1();
                }
                else {
                    this.xsMinInclusiveId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsMinLength) {
                XsMinLength element = (XsMinLength) ps;
                if(element.getId1()!=null) {
                    this.xsMinLengthId = ((XsMinLength)ps).getId1();
                }
                else {
                    this.xsMinLengthId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsNotation) {
                XsNotation element = (XsNotation) ps;
                if(element.getId1()!=null) {
                    this.xsNotationId = ((XsNotation)ps).getId1();
                }
                else {
                    this.xsNotationId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsPattern) {
                XsPattern element = (XsPattern) ps;
                if(element.getId1()!=null) {
                    this.xsPatternId = ((XsPattern)ps).getId1();
                }
                else {
                    this.xsPatternId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsRedefine) {
                XsRedefine element = (XsRedefine) ps;
                if(element.getId1()!=null) {
                    this.xsRedefineId = ((XsRedefine)ps).getId1();
                }
                else {
                    this.xsRedefineId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsRestriction) {
                XsRestriction element = (XsRestriction) ps;
                if(element.getId1()!=null) {
                    this.xsRestrictionId = ((XsRestriction)ps).getId1();
                }
                else {
                    this.xsRestrictionId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsSchema) {
                XsSchema element = (XsSchema) ps;
                if(element.getId1()!=null) {
                    this.xsSchemaId = ((XsSchema)ps).getId1();
                }
                else {
                    this.xsSchemaId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsSelector) {
                XsSelector element = (XsSelector) ps;
                if(element.getId1()!=null) {
                    this.xsSelectorId = ((XsSelector)ps).getId1();
                }
                else {
                    this.xsSelectorId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsSequence) {
                XsSequence element = (XsSequence) ps;
                if(element.getId1()!=null) {
                    this.xsSequenceId = ((XsSequence)ps).getId1();
                }
                else {
                    this.xsSequenceId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsSimpleContent) {
                XsSimpleContent element = (XsSimpleContent) ps;
                if(element.getId1()!=null) {
                    this.xsSimpleContentId = ((XsSimpleContent)ps).getId1();
                }
                else {
                    this.xsSequenceId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsSimpleType) {
                XsSimpleType element = (XsSimpleType) ps;
                if(element.getId1()!=null) {
                    this.xsSimpleTypeId = ((XsSimpleType)ps).getId1();
                }
                else {
                    this.xsSimpleTypeId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsTotalDigits) {
                XsTotalDigits element = (XsTotalDigits)ps;
                if(element.getId1()!=null) {
                    this.xsTotalDigitsId = ((XsTotalDigits)ps).getId1();
                }
                else {
                    this.xsTotalDigitsId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsUnion) {
                XsUnion element = (XsUnion) ps;
                if(element.getId1()!=null) {
                    this.xsUnionId = ((XsUnion)ps).getId1();
                }
                else {
                    this.xsUnionId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsUnique) {
                XsUnique element = (XsUnique) ps;
                if(element.getId1()!=null) {
                    this.xsUniqueId = ((XsUnique)ps).getId1();
                }
                else {
                    this.xsUniqueId = PMF.doCreate(element);
                }
                return;
            }
            if(ps instanceof XsWhitespace) {
                XsWhitespace element = (XsWhitespace) ps;
                if(element.getId1()!=null) {
                    this.xsWhitespaceId = element.getId1();
                }
                else {
                    this.xsWhitespaceId = PMF.doCreate(element);
                }
                return;
            }
        }
        catch(Exception e) {
            log.warning(e.getMessage());
            String warning = "";
            for(int i=0;i<e.getStackTrace().length;i++) {
                warning += e.getStackTrace()[i]+"\n";
            }
            log.warning(warning);
        }
        throw new SAXException("element "+ps+" was not added therefor AnyElement is empty");
    }

    public Object toObject() {
        try {
            if(this.bPartnerLinkTypeId!=0) return ((BPartnerLinkType)PMF.get(this.bPartnerLinkTypeId,new BPartnerLinkType()));
            if(this.bRoleId!=0) return ((BRole)PMF.get(this.bRoleId, new BRole()));
            if(this.sAddressId!=0) return ((SAddress)PMF.get(this.sAddressId, new SAddress()));
            if(this.sBindingId!=0) return ((SBinding)PMF.get(this.sBindingId, new SBinding()));
            if(this.sBodyId!=0) return ((SBody)PMF.get(this.sBodyId, new SBody()));
            if(this.sFaultId!=0) return ((SFault)PMF.get(this.sFaultId,new SFault()));
            if(this.sHeaderFaultId!=0) return ((SHeaderFault)PMF.get(this.sHeaderFaultId,new SHeaderFault()));
            if(this.sHeaderId!=0) return ((SHeader)PMF.get(this.sHeaderId,new SHeader()));
            if(this.sOperationId!=0) return ((SOperation)PMF.get(this.sOperationId, new SOperation()));
            if(this.tBindingId!=0) return ((TBinding)PMF.get(this.tBindingId, new TBinding()));
            if(this.tDefinitionsId!=0) return ((TDefinitions)PMF.get(this.tDefinitionsId, new TDefinitions()));
            if(this.bindingOperationFaultId!=0) return ((TBindingOperationFault)PMF.get(this.bindingOperationFaultId, new TBindingOperationFault()));
            if(this.bindingOperationId!=0) return ((TBindingOperation)PMF.get(this.bindingOperationId, new TBindingOperation()));
            if(this.bindingOperationMessageInputId!=0) return ((TBindingOperationMessageInput)PMF.get(this.bindingOperationMessageInputId, new TBindingOperationMessageInput()));
            if(this.bindingOperationMessageOutputId!=0) return ((TBindingOperationMessageOutput)PMF.get(this.bindingOperationMessageOutputId, new TBindingOperationMessageOutput()));
            if(this.documentId!=0) return ((TDocument)PMF.get(this.documentId,new TDocument()));
            if(this.documentationId!=0) return ((TDocumentation)PMF.get(this.documentationId, new TDocumentation()));
            if(this.faultId!=0) return ((TFault)PMF.get(this.faultId, new TFault()));
            if(this.importId!=0) return ((TImport)PMF.get(this.importId, new TImport()));
            if(this.messageId!=0) return ((TMessage)PMF.get(this.messageId, new TMessage()));
            if(this.operationId!=0) return ((TOperation)PMF.get(this.operationId, new TOperation()));
            if(this.paramInputId!=0) return ((TParamInput)PMF.get(this.paramInputId, new TParamInput()));
            if(this.paramOutputId!=0) return ((TParamOutput)PMF.get(this.paramOutputId, new TParamOutput()));
            if(this.partId!=0) return ((TPart)PMF.get(this.partId, new TPart()));
            if(this.portId!=0) return ((TPort)PMF.get(this.portId, new TPort()));
            if(this.portTypeId!=0) return ((TPortType)PMF.get(this.portTypeId, new TPortType()));
            if(this.serviceId!=0) return ((TService)PMF.get(this.serviceId, new TService()));
            if(this.typesId!=0) return ((TTypes)PMF.get(this.typesId, new TTypes()));
            if(this.xsAllId!=0) return (XsAll) PMF.get(this.xsAllId, new XsAll());
            if(this.xsAnnotationId!=0) return (XsAnnotation)PMF.get(this.xsAnnotationId, new XsAnnotation());
            if(this.xsAnyAttributeId!=0) return (XsAnyAttribute)PMF.get(this.xsAnyAttributeId, new XsAnyAttribute());
            if(this.xsAnyId!=0) return (XsAny)PMF.get(this.xsAnyId, new XsAny());
            if(this.xsAppInfoId!=0) return (XsAppInfo)PMF.get(this.xsAppInfoId, new XsAppInfo());
            if(this.xsAttributeGroupId!=0) return (XsAttributeGroup)PMF.get(this.xsAttributeGroupId, new XsAttributeGroup());
            if(this.xsAttributeId!=0) return (XsAttribute)PMF.get(this.xsAttributeId, new XsAttribute());
            if(this.xsChoiceId!=0) return (XsChoice)PMF.get(this.xsChoiceId, new XsChoice());
            if(this.xsComplexContentId!=0) return (XsComplexContent)PMF.get(this.xsComplexContentId, new XsComplexContent());
            if(this.xsComplexTypeId!=0) return (XsComplexType)PMF.get(this.xsComplexTypeId, new XsComplexType());
            if(this.xsDocumentationId!=0) return (XsDocumentation)PMF.get(this.xsDocumentationId, new XsDocumentation());
            if(this.xsElementId!=0) return (XsElement)PMF.get(this.xsElementId, new XsElement());
            if(this.xsEnumerationId!=0) return (XsEnumeration)PMF.get(this.xsEnumerationId, new XsEnumeration());
            if(this.xsExtensionId!=0) return (XsExtension)PMF.get(this.xsExtensionId, new XsExtension());
            if(this.xsFieldId!=0) return (XsField)PMF.get(this.xsFieldId, new XsField());
            if(this.xsFractionDigitsId!=0) return (XsFractionDigits)PMF.get(this.xsFractionDigitsId, new XsFractionDigits());
            if(this.xsGroupId!=0) return (XsGroup)PMF.get(this.xsGroupId, new XsGroup());
            if(this.xsImportId!=0) return (XsImport)PMF.get(this.xsImportId, new XsImport());
            if(this.xsIncludeId!=0) return (XsInclude)PMF.get(this.xsIncludeId, new  XsInclude());
            if(this.xsKeyId!=0) return (XsKey)PMF.get(this.xsKeyId, new XsKey());
            if(this.xsKeyRefId!=0) return (XsKeyRef)PMF.get(this.xsKeyRefId, new XsKeyRef());
            if(this.xsLengthId!=0) return (XsLength)PMF.get(this.xsLengthId, new XsLength());
            if(this.xsListId!=0) return (XsList)PMF.get(this.xsListId, new XsList());
            if(this.xsMaxExclusiveId!=0) return (XsMaxExclusive)PMF.get(this.xsMaxExclusiveId, new XsMaxExclusive());
            if(this.xsMaxInclusiveId!=0) return (XsMaxInclusive)PMF.get(this.xsMaxInclusiveId,new XsMaxInclusive());
            if(this.xsMaxLengthId!=0) return (XsMaxLength)PMF.get(this.xsMaxLengthId,new XsMaxLength());
            if(this.xsMinExclusiveId!=0) return (XsMinExclusive)PMF.get(this.xsMinExclusiveId,new XsMinExclusive());
            if(this.xsMinInclusiveId!=0) return (XsMinInclusive)PMF.get(this.xsMinInclusiveId,new XsMinInclusive());
            if(this.xsMinLengthId!=0) return (XsMinLength)PMF.get(this.xsMinLengthId,new XsMinLength());
            if(this.xsNotationId!=0) return (XsNotation)PMF.get(this.xsNotationId,new XsNotation());
            if(this.xsPatternId!=0) return (XsPattern)PMF.get(this.xsPatternId,new XsPattern());
            if(this.xsRedefineId!=0) return (XsRedefine)PMF.get(this.xsRedefineId,new XsRedefine());
            if(this.xsRestrictionId!=0) return (XsRestriction)PMF.get(this.xsRestrictionId,new XsRestriction());
            if(this.xsSchemaId!=0) return (XsSchema)PMF.get(this.xsSchemaId,new XsSchema());
            if(this.xsSelectorId!=0) return (XsSelector)PMF.get(this.xsSelectorId,new XsSelector());
            if(this.xsSequenceId!=0) return (XsSequence)PMF.get(this.xsSequenceId,new XsSequence());
            if(this.xsSimpleContentId!=0) return (XsSimpleContent)PMF.get(this.xsSimpleContentId,new XsSimpleContent());
            if(this.xsSimpleTypeId!=0) return (XsSimpleType)PMF.get(this.xsSimpleTypeId,new XsSimpleType());
        }
        catch(Exception e) {
            log.warning(e.getMessage());
            String buf = "";
            for(int i=0;i<e.getStackTrace().length;i++) {
                buf += e.getStackTrace()[i].toString()+"\n";
            }
            log.warning(buf);
        }
        return null;
    }

}
